#########################################
#         File name   :release-mem.sh
#         Author      :kangkangliang
#         File desc   :
#         Mail        :liangkangkang@paag.com
#         Create time :2016-01-21
#########################################
#!/usr/bin/bash

#look mem use
free -g
sync
#default == 0
cat /proc/sys/vm/drop_caches
#now setup value = 3
echo 3 > /proc/sys/vm/drop_caches
free -g
sync
#To free pagecache, use echo 1 > /proc/sys/vm/drop_caches;
#to free dentries and inodes, use echo 2 > /proc/sys/vm/drop_caches;
#to free pagecache, dentries and inodes, use echo 3 > /proc/sys/vm/drop_caches.
